package sync

import (
	"promsync/cmd/config"
	"promsync/nacos"
	"promsync/progress/log"
)

type Synchronizer struct {
}

func (*Synchronizer) Start(config *config.AppConfig) {

	err := nacos.InitClient(config)
	if err != nil {
		log.Log.Errorf("初始化nacos失败 ：%s", err)
		return
	}

	p := &PrometheusSync{Config: config}
	p.Sync()

	r := &PrometheusRuleSync{Config: config}
	r.Sync()

	a := &AlertManagerConfigSync{Config: config}
	a.Sync()

}
